<%--
  Created by IntelliJ IDEA.
  User: 余先生
  Date: 2021/6/7
  Time: 11:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table border="3" width="80%" align="center">
    <tr align="center">
        <td>学号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>性别</td>
        <td>地址</td>
        <td>状态</td>
        <td>生日</td>
        <td>年级编号</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${list}" var="s">
        <tr>
            <td>${s.xh}</td>
            <td>${s.name}</td>
            <td>${s.age}</td>
            <td>${s.sex}</td>
            <td>${s.address}</td>
            <td>${s.state}</td>
            <td><fmt:formatDate value="${s.birthday}" pattern="yyyy-MM-dd"/></td>
            <td>${s.gid}</td>
            <td style="background-color: #c1edcf">
                <a style="color: red" href="JavaScript:if(confirm('你确定要删除当前学生的信息吗?')){location.href='/delectStudent?xh=${s.xh}'}">删除</a>
                <a style="color: blue" href="/selectOneStu?xh=${s.xh}">修改</a>
                <a style="color: darkgreen" href="/jsp/addStudent.jsp">添加</a>
            </td>
        </tr>
    </c:forEach>
</table>

</body>
</html>
